<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>积分导入信息列表</title> <%@ include file="/page/include.jsp"%>
<script src="<%=basePath%>/statics/js/webform.js" type="text/javascript"></script>
<link href="<%=basePath%>/statics/css/webform.css?v=20180104" rel="stylesheet" />
<script src="<%=basePath%>/statics/js/bootstrap-filestyle.min.js" type="text/javascript"></script>
</head>
<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            <div class="framebody" role="main">
                <!-- <blockquote class="ui-elem-quote">积分导入信息</blockquote> -->
                <div class="clearfix"></div>
                    <div class="row">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2>
                                        <i class="fa fa-pencil fa-fw"></i>查询条件 <small></small>
                                    </h2>
                                    <ul class="nav navbar-right panel_toolbox">
                                        <li><a class="collapse-link"><i
                                                class="fa fa-chevron-up"></i></a></li>
                                        <li class="dropdown"><a href="#" class="dropdown-toggle"
                                            data-toggle="dropdown" role="button" aria-expanded="false"><i
                                                class="fa fa-wrench"></i></a></li>
                                        <li><a class="close-link"><i class="fa fa-close"></i></a>
                                        </li>
                                    </ul>
                                    <div class="clearfix">
                                        <!-- <div class="switch" id="switch" onColor="danger" offColor="danger" onText="上架" offText="下架" labelText="状态">
                                            <input type="checkbox" checked />
                                        </div> -->
                                    </div>
                                </div>
                                
                                <div class="x_content">
                                    <form id="pointSearchForm" class="form-horizontal form-label-left">
                                        <div class="form-group">
                                            <label class="control-label col-md-1" for="mobile">客户号码： </label>
                                            <div class="col-md-3">
                                                <input type="text" id="mobile" name="mobile" class="form-control col-md-12">
                                            </div>
                                            <label class="control-label col-md-1" for="customerName">客户名称： </label>
                                            <div class="col-md-3">
                                                <input type="text" id="customerName" name="customerName" class="form-control col-md-12">
                                            </div>
                                            <label class="control-label col-md-1" for="companyName">客户单位： </label>
                                            <div class="col-md-3">
                                                <input type="text" id="companyName" name="companyName" class="form-control col-md-12">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-1" for="operateType">操作类型：</label>
                                            <div class="col-md-3">
                                                <select class="selectpicker form-control col-md-12" id="optType" title="操作类型">
                                                    <option value="">全部</option>
                                                    <option value="16">人工赠送(导入)</option>
                                                    <option value="17">人工核减(导入)</option>
                                                </select>
                                            </div>
                                            <label class="control-label col-md-1" for="auditStatus">审批状态：</label>
                                            <div class="col-md-3">
                                                <select class="selectpicker form-control col-md-12" id="auditStatus" title="审批状态">
                                                </select>
                                            </div>
                                            <div class="pull-right">
                                                <a class="btn btn-danger" id="btnClear"><i class="fa fa-trash-o fa-fw"></i>清空</a> 
                                                <a class="btn btn-primary search" id="btnQuery"><i class="fa fa-search-plus fa-fw"></i>查询</a>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>
                                    <i class="fa fa-reorder fa-fw"></i>积分导入信息列表 <small></small>
                                </h2>
                                <div class="clearfix">
                                    <div class="pull-left"></div>
                                </div>
                            </div>
                            <div class="x_content">
                                <div class="row" style="padding-bottom: 10px;">
                                    <button type="button" class="btn btn-primary btn-sm" id="btnDownUp"><i class="fa fa-pencil-square-o fa-lg"></i>&nbsp;模板下载及导入</button>
                                    <button type="button" class="btn btn-warning btn-sm" id="btnAuditBatch"><i class="fa fa-hand-paper-o fa-lg"></i>&nbsp;批量审核</button>
                                    <button type="button" class="btn btn-success btn-sm" id="btnAuditAll"><i class="fa fa-hand-rock-o fa-lg"></i>&nbsp;全部审核</button>
                                    <button type="button" class="btn btn-danger btn-sm" id="btnDeleteBatch"><i class="fa fa-trash-o fa-lg"></i>&nbsp;批量删除</button>
                                </div>
                                <div class="row">
                                    <table id="pointImportTable" class="table"></table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    
    <%-- 模板下载与导入弹出框 begin --%>
    <div class="modal fade" id="editModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="editModalLabel"
        aria-hidden="true">
        <div class="modal-dialog" style="width: 60%; min-height: 450px; height: 500px; max-height: 500px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="editModalLabel">模版下载与导入</h4>
                </div>
                <div class="modal-body">
                    <%-- 积分导入模版下载 begin --%>
                    <div class="row">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2>
                                        <i class="fa fa-pencil fa-fw"></i>下载模版 <small></small>
                                    </h2>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="x_content">
                                    <form id="pointTemplateFrom" name="pointTemplateFrom" class="form-horizontal form-label-left"
                                        action="<%=basePath%>/pointImport/exportTemp" onsubmit="return doExpCheck();">
                                        <div class="form-group">
                                            <label class="control-label col-md-2" for="customerLevel">客户级别： </label>
                                            <div class="col-md-2">
                                                <select class="selectpicker form-control col-md-12 col-xs-12" id="customerLevel" name="customerLevel"
                                                    data-live-search="true" title="客户级别" data-width="100%">
                                                    <option value="">请选择</option>
                                                </select>
                                            </div>
                                            <label class="control-label col-md-2" for="customerLevel">区域： </label>
                                            <div class="col-md-2">
                                                <select id="provinceCode" name="provinceCode" class="selectpicker" title="省" data-live-search="true" data-width="100%"></select>
                                            </div>
                                            <div class="col-md-2">
                                                <select id="cityCode" name="cityCode" class="selectpicker" title="市" data-live-search="true" data-width="100%"></select> 
                                            </div>
                                            <div class="col-md-2">
                                                <select id="areaCode" name="areaCode" class="selectpicker" title="区" data-live-search="true" data-width="100%"></select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-2" for="customerLevel">操作类型： </label>
                                            <div class="col-md-2">
                                                <select class="selectpicker form-control col-md-12 col-xs-12" id="operateType" name="operateType"
                                                    data-live-search="true" title="操作类型" data-width="100%">
                                                </select>
                                            </div>
                                            <div class="pull-right">
                                                <input type="submit" class="btn btn-success" value="下载模版" />
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <%-- 积分导入模版下载 end --%>
    
                    <%-- 积分导入  begin --%>
                    <div class="row">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2>
                                        <i class="fa fa-pencil fa-fw"></i>积分导入 <small></small>
                                    </h2>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="x_content">
                                    <form id="pointImportFrom" name="pointImportFrom" method="post" enctype="multipart/form-data"
                                        action="<%=basePath%>/pointImport/pointImp">
                                        <div class="form-group">
                                            <label class="control-label col-md-2 txtRight padTop8" for="file">文件选择： </label>
                                            <div class="col-md-4">
                                                <input name="file" id="file" type="file" />
                                            </div>
                                            <div class="col-md-2">
                                                <input type="submit" class="btn btn-success" value="上传" />
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <%-- 积分导入 end --%>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <%-- 模板下载与导入弹出框 end --%>
    
    
    
    <%-- 积分调整操作弹出框 begin --%>
    <div class="modal fade" id="pointImportModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="pointImportModalLabel"
        aria-hidden="true">
        <form action="#" class="form-horizontal form-label-left">
            <div class="modal-dialog" style="width: 50%; min-height: 450px; height: 500px; max-height: 500px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="pointImportModalLabel">积分调整编辑</h4>
                    </div>
                    <div class="modal-body">
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-3"><b>姓名：</b></label>
                            <div class="col-md-3 col-sm-3 col-xs-3 padTop8" id="labelCustomerName">&nbsp;</div>
                            <label class="control-label col-md-3 col-sm-3 col-xs-3"><b>手机号码：</b></label>
                            <div class="col-md-3 col-sm-3 col-xs-3 padTop8" id="labelMobile">&nbsp;</div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-3"><b>操作类型：</b></label>
                            <div class="col-md-3 col-sm-3 col-xs-3 padTop8" id="labelOperateType">&nbsp;</div>
                            <label class="control-label col-md-3 col-sm-3 col-xs-3"><font color="red">*</font><b>操作积分：</b></label>
                            <div class="col-md-3 col-sm-3 col-xs-3">
                                <input type="text" class="form-control" id="operatePoint" validate="{required:true,isNoInteger:true}">
                            </div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-3 col-sm-3 col-xs-3"><font color="red">*</font><b>原因：</b></label>
                            <div class="col-md-9 col-sm-9 col-xs-9">
                                <textarea id="adjustReason" name="adjustReason" maxlength="250" class="form-control col-md-10 col-xs-12"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <input type="hidden" id="id" /> <input type="hidden" id="customerId" />
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" onclick="javascript: doSavePointImport();">确定</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <%-- 积分调整操作弹出框 end --%>
    
    <%-- 积分调整审核弹出框 begin --%>
    <div class="modal fade" id="auditModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="auditModalLabel"
        aria-hidden="true">
        <form action="#" class="form-horizontal form-label-left">
            <div class="modal-dialog" style="width: 50%; min-height: 450px; height: 500px; max-height: 500px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="auditModalLabel">审核</h4>
                    </div>
                    <div class="modal-body">
                        <div class="item form-group">
                            <label class="control-label col-md-2 col-sm-2 col-xs-2"><b>审核结果：</b></label>
                            <div class="col-md-10 col-sm-10 col-xs-10" id="approveStatus">
                                <input id="isAll" type="hidden" />
                                <label class="control-label" for="approveStatus" style="margin-right: 100px;"> 
                                    <input name="approveStatus" value="2" type="radio" class="form-control">&nbsp;通过</label>
                                <label class="control-label" for="approveStatus" style="margin-right: 100px;"> 
                                    <input name="approveStatus" value="3" type="radio" class="form-control">&nbsp;驳回</label>
                            </div>
                        </div>
                        <div class="item form-group">
                            <label class="control-label col-md-2 col-sm-2 col-xs-2"><font color="red">*</font><b>审核意见：</b></label>
                            <div class="col-md-10 col-sm-10 col-xs-10">
                                <textarea id="approveRemark" name="approveRemark" maxlength="300" class="form-control col-md-10 col-xs-12"></textarea>
                            </div>
                        </div>
                        <div class="item form-group" id="psBatchDiv">
                            <label class="control-label col-md-2 col-sm-2 col-xs-2"><font color="red">*</font><b>注意事项：</b></label>
                            <div class="col-md-10 col-sm-10 col-xs-10 padTop8" >
                                <font>1、您当前的操作是<b class="colorRed">批量审核</b>。</font><br/><br/>
                                <font>2、审核<b class="colorRed">通过</b>时，您选中的积分调整记录将会立即生效，积分会立即增减到对应的客户积分账户。</font><br/><br/>
                                <font>3、审核<b class="colorRed">驳回</b>时，您选中的记录将会被禁用，无法撤销。</font>
                            </div>
                        </div>
                        <div class="item form-group" id="psAllDiv">
                            <label class="control-label col-md-2 col-sm-2 col-xs-2"><font color="red">*</font><b>注意事项：</b></label>
                            <div class="col-md-10 col-sm-10 col-xs-10 padTop8" >
                                <font>1、您当前的操作是<b class="colorRed">全部审核</b>。</font><br/><br/>
                                <font>2、审核<b class="colorRed">通过</b>时，所有<span class="label label-warning">待审核</span>的积分调整记录将会立即生效，积分会立即增减到对应的客户积分账户。</font><br/><br/>
                                <font>3、审核<b class="colorRed">驳回</b>时，所有<span class="label label-warning">待审核</span>的记录将会被禁用，无法撤销。</font>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <input type="hidden" id="isAll" /> 
                        <input type="hidden" id="customerId" />
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" onclick="javascript: doAudit();">提交</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <%-- 积分调整审核弹出框 end --%>

    <%-- 积分导入结果弹出框 begin --%>
    <div class="modal fade" id="pointImpModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="pointImpModalLabel"
        aria-hidden="true">
        <form action="#" class="form-horizontal form-label-left">
            <div class="modal-dialog" style="width: 50%; min-height: 450px; height: 500px; max-height: 500px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="pointImpModalLabel">积分导入结果</h4>
                    </div>
                    <div class="modal-body">
                        <div id="pointImpMsg">${msg }</div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <%-- 积分导入结果弹出框 end --%>
    <script src="${rootPath}/js/point/pointImport_list.js"></script>
</body>
</html>